import type { App } from 'vue'
import loading from './loading'
import permission from './permission'
import drag from './drag'
const directiveMap = { loading, permission, drag }

const directives = {
  install(app: App) {
    Object.keys(directiveMap).forEach(key => {
      app.directive(key, directiveMap[key as keyof typeof directiveMap])
    })
  },
}

export default directives
